package com.ddyx.rest;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ddyx.service.IWxPortalPicService;
import com.ddyx.util.RequestForm;
import com.ddyx.util.ResponseForm;

@Controller
@RequestMapping("/portal")
public class WxPortalController {
	
	@Resource
	IWxPortalPicService iWxPortalPicService;
	
	/**
	 * 删除首页展示图片接口
	 * @param requestForm
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/deletePortalPic", method = RequestMethod.POST)
	public ResponseForm deletePortalPic(@RequestBody RequestForm requestForm) {
		return iWxPortalPicService.deletePortalPic(requestForm);
	}
	
	
	/**
	 * 添加首页展示图片接口
	 * @param requestForm
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/insertPortalPic", method = RequestMethod.POST)
	public ResponseForm insertPortalPic(HttpServletRequest request) {
		return iWxPortalPicService.insertPortalPic(request);
	}
	
	
	/**
	 * 修改首页展示图片接口
	 * @param requestForm
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/updatePortalPic", method = RequestMethod.POST)
	public ResponseForm updatePortalPic(@RequestBody RequestForm requestForm) {
		return iWxPortalPicService.updatePortalPic(requestForm);
	}
	
	/**
	 * 查询首页展示图片接口
	 * @param requestForm
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/selectPortalPic", method = RequestMethod.POST)
	public ResponseForm selectPortalPic(@RequestBody RequestForm requestForm) {
		return iWxPortalPicService.selectPortalPic(requestForm);
	}
	
}
